package com.bungarus.model;

import com.bungarus.busi.Callback;
import com.bungarus.busi.InnerClient;

import java.util.Map;

/**
 * Created by tang on 2018/11/15.
 */
public interface BungarusServer {
    void bind(String serviceHost, int[] servicePorts, int[] heartBeatPorts) throws BungarusServerException;
    void listen(Callback<Object, Void> callback) throws BungarusServerException;
    void shutdown() throws BungarusServerException;

    void initClusterAndConnectRemoteNode() throws BungarusServerException;
    void initRemedy() throws Exception;

    Map<String, InnerClient> getInnerClients();
    InnerClient getInnerClientConnectingToBackendClusterNode(String clusterTag);
}
